<?php
require_once('config.php');

$id=$_GET["id"];
$password=$_GET["password"];
$telephone=$_GET["telephone"];


$sql = "UPDATE userinfo SET password = '$password', telephone = '$telephone' WHERE id = '$id'";


mysqli_query($conn, $sql);

$count = mysqli_affected_rows($conn);

$obj = array();

if($count > 0) {
  // 更新成功
  $obj["code"] = 1;
  $obj["msg"] = '更新成功';
} else {
  $obj["code"] = 0;
  $obj["msg"] = '更新失败';
}

echo json_encode($obj);




